package com.szxy.frontend.portal.controller;

import com.szxy.frontend.portal.service.ContentService;
import com.szxy.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther:zwer
 * @Date:2019/9/11 9:29
 * @Description:com.szxy.frontend.portal.controller
 * @Version:1.0
 **/
@RestController
@RequestMapping("/frontend/content")
public class ContentController {

    @Autowired
    private ContentService contentService;

    @GetMapping("/selectFrontendContentByAD")
    public Result selectFrontendContentByAD(){
        try {
            // Thread.sleep(20000); // 超时两秒，用于测试网关超时
            return this.contentService.selectFrontendContentByAD();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Result.build(500,"error");
    }

}
